package com.tanhua.dubbo.api.mongo;

import com.tanhua.domain.mongo.Publish;
import com.tanhua.domain.vo.PageResult;

import java.util.List;

public interface PublishApi {

    //保存动态
    void save(Publish publish);

    //查询好友的动态表(刷朋友圈)
    PageResult findByTimeLine(Integer page, Integer pagesize, Long userId);

    //推荐的圈子表,查询推荐的朋友圈
    PageResult queryRecommendPublishList(Integer page, Integer pagesize, Long userId);

    //根据id查找动态
    Publish findById(String publishId);


    /**
     * 查询某用户的动态
     * @param page
     * @param pagesize
     * @param userId
     * @return
     */
    PageResult queryMyPublishList(Integer page, Integer pagesize, Long userId);

    //查询自己发布的动态
    PageResult findPublishList(Integer page, Integer pagesize, Long uid, String state);

    //更新动态的id
    void updateState(Publish publish, int state);

    //根据pid的集合查找动态
    List<Publish> findByPids(List<Long> pList);

    Long pass(List<String> publishId);

    Long reject(List<String> publishId);

}
